bits 32

;void my_longjmp(jmp_buf jb, int value);
my_longjmp:
	mov edx, [esp + 4]
	mov eax, [esp + 8]
	cmp eax, 1
	adc eax, 0

	mov ebp, [edx + 0]
	mov ebx, [edx + 4]
	mov edi, [edx + 8]
	mov esi, [edx + 12]
	mov esp, [edx + 16]

	add esp, 4
	jmp [edx + 20]
	times 4 - ($ - $$ & 3) nop
